<case value="radio">
    <!--
        如果选项的值是自定义数组(必须定义key为title的元素)需要解析，如果选项的值是常规字符串直接显示
        此处主要是用来给option定义更多的属性，比如data-ia=1，那么option应为
        $option = array('title' => 标题, 'data-id' => 1);
    -->
   <div class="form-group item_{$field.name} {$field.extra_class}">
   <label for="{$field.name}" class="col-md-3 control-label">{$field.title|htmlspecialchars}:</label>
    <div class="col-md-9">
            <foreach name="field.options" item="option" key="option_key">
                <php>if(is_array($option)):</php>


                    <label for="{$field.name}{$option_key}"><input type="radio" id="{$field.name}{$option_key}" class="radio" name="{$field.name}" value="{$option_key}" <eq name="field.value" value="$option_key"> checked</eq> {$field.extra_attr}
                        <foreach name="option" item="option2" key="option_key2">
                            {$option_key2}="{$option2}"
                        </foreach>>
                        <span class="check"></span>
                   {$option.title}</label>
                <php>else:</php>
                    <div class="radio radio-primary">
                        <label for="{$field.name}{$option_key}">
                          <input type="radio" name="{$field.name}" id="{$field.name}{$option_key}" value="{$option_key}" <eq name="field.value" value="$option_key"> checked</eq> {$field.extra_attr}><span class="circle"></span><span class="check"></span>
                         {$option}
                        </label>
                      </div>

                <php>endif;</php>
            </foreach>
      </div>
    </div>
</case>
